package src.chapter2.teast01;
import java.util.Scanner;
public class test02 {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入n：");
        int x4 = sc.nextInt();
        int y4 = 1;
        int sum =0;
        while( y4 <= x4 ) {
            sum+=y4;
            y4+=1;
        }
        System.out.println("sum:" + sum );
    }
}
